package com.jiezhuo.service.impl.jw;

import com.jiezhuo.entity.jw.DmXk;
import com.jiezhuo.entity.jw.JwVo;
import com.jiezhuo.entity.jw.StuVo;
import com.jiezhuo.mapper.center.DmXkMapper;
import com.jiezhuo.service.jw.DmXkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiezhuo.utils.R;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author com.jiezhuo
 * @since 2024-06-27
 */
@Service
public class DmXkServiceImpl extends ServiceImpl<DmXkMapper, DmXk> implements DmXkService {

    @Override
    public R getTeacherRk(JwVo jwVo) {
       int i= this.getBaseMapper().getTeacherRkCount(jwVo);
        ArrayList<HashMap<String, Object>> teacherRk = this.getBaseMapper().getTeacherRk(jwVo);
        return R.ok().data("list",teacherRk).data("total",i);
    }

    @Override
    public R getSchoolClassInfo(JwVo jwVo) {
        ArrayList<HashMap<String, Object>> list=  this.getBaseMapper().getSchoolClassInfo(jwVo);

        return R.ok().data("list",list);
    }

    @Override
    public R getSchoolMoveClassInfo(JwVo jwVo) {
        ArrayList<HashMap<String, Object>> list=  this.getBaseMapper().getSchoolMoveClassInfo(jwVo);
        return  R.ok().data("list",list);
    }

    @Override
    public R getPrimaryUpgrade(JwVo jwVo) {
        ArrayList<HashMap<String, Object>> list=  this.getBaseMapper().getPrimaryUpgrade(jwVo);
        return  R.ok().data("list",list);
    }

    @Override
    public R getByInfo(StuVo s) {
        HashMap<String, Object> map=  this.getBaseMapper().getByInfo(s);
        return  R.ok().data("map",map);
    }

}
